﻿namespace BacklogParser.Models
{
    using System.Collections.Generic;
    using System.Text;
    public class ApplicationReference
    {
        public ApplicationReference()
        {
            this.DocumentIds = new List<DocumentId>();
        }

        public List<DocumentId> DocumentIds { get; set; }
    }

    public class DocumentId
    {
        public string Country { get; set; }

        public string DocNumber { get; set; }

        public string Date { get; set; }
        public string Kind { get; internal set; }
        public string Lang { get; internal set; }

        public override string ToString()
        {
            var builder = new StringBuilder();

            if (!string.IsNullOrEmpty(Country))
                builder.AppendLine(string.Format("      Country {0}", Country));

            if (!string.IsNullOrEmpty(DocNumber))
                builder.AppendLine(string.Format("      DocNumber {0}", DocNumber));

            if (!string.IsNullOrEmpty(Date))
                builder.AppendLine(string.Format("      Date {0}", Date));

            if (!string.IsNullOrEmpty(Kind))                
                builder.AppendLine(string.Format("      Kind {0}", Kind));

            return builder.ToString().Trim();
        }
    }
}